package com.wave.mapper;

import com.wave.entity.LAF;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LAFMapper {

    int createLAFPara(LAF laf);
    int createLAFData(LAF laf);

    int alterLAFPara(LAF laf);
    int alterLAFData(LAF laf);

    int alterLAFState(@Param("lafId")int lafId, @Param("state")String state);

    List<LAF> getList(@Param("type")String type,
                      @Param("pageStart")int pageStart, @Param("pageSize")int pageSize);
    List<LAF> list(@Param("type")String type,
                   @Param("lafAuthorName")String lafAuthorName, @Param("lafTitle")String lafTitle,
                   @Param("pageStart")int pageStart, @Param("pageSize")int pageSize);

    List<LAF> getMyLAF(String lafAuthor);

    List<LAF> searchLAFTitle(String lafTitle);
    LAF getLAFDetail(Integer lafId);

    String getState(int lafId);

    List<LAF> getIndexLAF();

    int countLaf(@Param("type")String type, @Param("lafTitle")String lafTitle,
                 @Param("lafAuthorName")String lafAuthorName);
    int countLafUser();
    int countLafState(String state);
}
